//
//  SendMsgService.m
//  WisdomStar
//
//  Created by 谭飞 on 2018/11/2.
//  Copyright © 2018年 zhangliwen. All rights reserved.
//

#import "SendMsgService.h"
#import "SendMsgAPI.h"

@implementation SendMsgService

/**
 发送短信验证码

 @param mobile 手机号
 */
+ (void)sendCode:(NSString *)mobile complete:(nonnull void (^)(BOOL))completion {
    SendMsgAPI *api = [[SendMsgAPI alloc] init];
    NSMutableDictionary *mdic = [NSMutableDictionary dictionary];
    mdic[@"mobile"] = mobile;
    api.outerParameters = mdic;
    [api startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
        NSLog(@"=========发送短信成功");
        completion(true);
    } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
        NSLog(@"=========发送短信失败");
        completion(false);
    }];
}

@end
